home *** CD-ROM | disk | FTP | other *** search
Makefile | 1992-10-20 | 3.2 KB | 120 lines |
- # Makefile for UnZip, ZipInfo and FUnZip 19 October 1992
- #
- # - for Microsoft C under OS/2 1.x (16-bit), version 6.00 or higher
- # - for IBM C Set/2 under OS/2 2.0 (32-bit)
- # - for Watcom C/386 under OS/2 2.0 (32-bit), version 9.0 or higher
- # - for GNU gcc (emx kit) under OS/2 2.0 (32-bit), version 0.8e or higher
-
- # To use, enter "{d,n}make -f makefile.os2" (this makefile depends on its
- # name being "makefile.os2").
-
- # Notes on Microsoft C 6.00 compilation:
- # The resulting programs can be used under OS/2 1.x or 2.x
- # protected mode only, not under DOS. A larger stack has to
- # be used for OS/2 because system calls use more stack than
- # under DOS; 8k is recommended by Microsoft.
-
- # Notes on IBM C Set/2, Watcom C/386 or gcc compilation:
- # The resulting programs can be used under OS/2 protected
- # mode of OS/2 2.0 only, not under 1.x and not under DOS.
-
- default:
- @echo Enter "$(MAKE) -f makefile.os2 msc"
- @echo or "$(MAKE) -f makefile.os2 ibm"
- @echo or "$(MAKE) -f makefile.os2 watcom"
- @echo or "$(MAKE) -f makefile.os2 gcc"
-
- mscdos:
- $(MAKE) -f makefile.os2 all \
- CC="cl -nologo -AC -Oaict -Gs" \
- CFLAGS="-Zp1" \
- LDFLAGS="-Lr -F 1000 -Fe" \
- LDFLAGS2="" \
- OUT="-Fo" \
- OBJ=".obj" \
- OBJU2="msdos.obj" OBJZ2="" OBJF2="" DEF=""
-
- msc:
- $(MAKE) -f makefile.os2 all \
- CC="cl -nologo -AC -Ocegit -Gs" \
- CFLAGS="-G2 -Zp1 -DOS2 -DMSC" \
- LDFLAGS="-Lp -F 2000 -Fe" \
- LDFLAGS2="" \
- OUT="-Fo" \
- OBJ=".obj" \
-
- ibm:
- $(MAKE) -f makefile.os2 all \
- CC="icc -q -O -Gs" \
- CFLAGS="-Sm -Sp1 -DOS2" \
- LDFLAGS="-B/ST:0x20000 -Fe" \
- LDFLAGS2="" \
- OUT="-Fo" \
- OBJ=".obj" \
-
- watcom:
- $(MAKE) -f makefile.os2 all \
- CC="wcl386 -zq -Ox -s" \
- CFLAGS="-Zp1 -DOS2" \
- LDFLAGS="-k0x20000 -x -Fe=" \
- LDFLAGS2="" \
- OUT="-Fo" \
- OBJ=".obj" \
- DEF=""
-
- gcc:
- $(MAKE) -f makefile.os2 all \
- CC="gcc -O" \
- CFLAGS="-DOS2" \
- LDFLAGS="-o " \
- LDFLAGS2="-los2 -s" \
- OUT="-o" \
- OBJ=".o"
-
- # variables
- OBJU = unzip$(OBJ) crypt$(OBJ) envargs$(OBJ) explode$(OBJ) \
- extract$(OBJ) file_io$(OBJ) inflate$(OBJ) mapname$(OBJ) \
- match$(OBJ) misc$(OBJ) unreduce$(OBJ) unshrink$(OBJ)
- OBJU2 = os2$(OBJ)
- OBJZ = zipinfo$(OBJ) envargs$(OBJ) match$(OBJ)
- OBJZ2 = os2_$(OBJ)
- OBJF = funzip$(OBJ) inflate$(OBJ)
- OBJF2 = crypt_$(OBJ)
- DEF = unzip.def
-
- .c$(OBJ):
- $(CC) $(CFLAGS) -c $<
-
- all: unzip.exe zipinfo.exe funzip.exe
-
- unzip.exe: $(OBJU) $(OBJU2) $(DEF)
- $(CC) $(LDFLAGS)$@ $(DEF) $(OBJU) $(OBJU2) $(LDFLAGS2)
-
- zipinfo.exe: $(OBJZ) $(OBJZ2) $(DEF)
- $(CC) $(LDFLAGS)$@ $(DEF) $(OBJZ) $(OBJZ2) $(LDFLAGS2)
-
- funzip.exe: $(OBJF) $(OBJF2) $(DEF)
- $(CC) $(LDFLAGS)$@ $(DEF) $(OBJF) $(OBJF2) $(LDFLAGS2)
-
- crypt$(OBJ): crypt.c unzip.h crypt.h zip.h
- envargs$(OBJ): envargs.c unzip.h
- explode$(OBJ): explode.c unzip.h
- extract$(OBJ): extract.c unzip.h crypt.h
- file_io$(OBJ): file_io.c unzip.h crypt.h
- funzip$(OBJ): funzip.c unzip.h crypt.h
- inflate$(OBJ): inflate.c unzip.h
- mapname$(OBJ): mapname.c unzip.h
- match$(OBJ): match.c unzip.h
- misc$(OBJ): misc.c unzip.h
- os2$(OBJ): os2.c unzip.h
- unreduce$(OBJ): unreduce.c unzip.h
- unshrink$(OBJ): unshrink.c unzip.h
- unzip$(OBJ): unzip.c unzip.h crypt.h
- zipinfo$(OBJ): zipinfo.c unzip.h
-
- crypt_$(OBJ): crypt.c unzip.h
- $(CC) -c $(CFLAGS) -DFUNZIP $(OUT)$@ crypt.c
-
- os2_$(OBJ): os2.c unzip.h
- $(CC) -c $(CFLAGS) -DZIPINFO $(OUT)$@ os2.c
-